from Global import *
from Tables import *


try:
    # 创建会话
    Session = sessionmaker(bind=engine)
    session = Session()

    # 添加新记录
    new_user = User(name='John', age=30)
    session.add(new_user)
    session.commit()
except Exception as e:
    print("连接失败：", e)
